package a.f.d.a;

import a.c.bb;
import a.c.e;
import a.c.k;
import a.c.m;
import a.c.q;
import a.c.v;
import a.c.w;
import a.c.x;
import a.c.y;
import a.c.z;
import a.f.c.h;
import a.f.o;
import a.i.db;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;

class ad
  extends zc
{
  o e;
  bc i;
  x K;
  ArrayList L;
  q M;
  boolean N = true;
  
  ad(hb paramhb, o paramo, bc parambc)
  {
    super(paramhb, null);
    this.e = paramo;
    this.i = parambc;
    this.L = new ArrayList();
    k localk1 = paramo.c(i.c);
    k localk2 = paramo.c(i.a);
    k localk3 = paramo.c(i.b);
    if (!bool2)
    {
      if ((localk1 == null) || ((bool2) || ((localk2 == null) || (localk3 == null)))) {
        this.N = false;
      }
    }
    else {
      return;
    }
    this.K = db.a();
    h localh = new h(paramo);
    HashMap localHashMap = new HashMap();
    this.L.add(this);
    this.K.a(null, this);
    Object localObject1 = paramo.v();
    Object localObject3;
    Object localObject4;
    label279:
    label280:
    do
    {
      if (!((w)localObject1).e()) {
        break;
      }
      localObject2 = ((w)localObject1).d();
      localObject3 = localk2.get(localObject2);
      if (!bool2) {
        if (localh.e((e)localObject2))
        {
          if (bool2) {
            break label279;
          }
          if (!localh.c((e)localObject2).isEmpty())
          {
            localObject4 = new zc(paramhb, (e)localObject2);
            localHashMap.put(localObject3, localObject4);
            this.L.add(localObject4);
            this.K.a(localObject2, localObject4);
            if (bool2) {
              continue;
            }
            if (!bool1) {
              break label280;
            }
          }
        }
      }
      localHashMap.put(localObject3, localObject2);
      ((w)localObject1).f();
    } while (!bool1);
    localObject1 = null;
    Object localObject2 = paramo.v();
    while (((w)localObject2).e())
    {
      localObject3 = ((w)localObject2).d();
      localObject4 = localk3.get(localObject3);
      if (!bool2)
      {
        if (!localHashMap.containsKey(localObject4))
        {
          localObject1 = localObject4;
          break;
        }
        ((w)localObject2).f();
      }
    }
    localObject2 = paramo.v();
    do
    {
      do
      {
        if (!((w)localObject2).e()) {
          break;
        }
        localObject3 = ((w)localObject2).d();
        localObject4 = localk2.get(localObject3);
        Object localObject5 = localk3.get(localObject3);
        Object localObject6 = localHashMap.get(localObject4);
        Object localObject7 = localHashMap.get(localObject5);
        if (bool1) {
          return;
        }
        zc localzc = (zc)(localObject7 == null ? this : localObject7);
        d.q_ localq_ = (d.q_)parambc.a((e)localObject3);
        localq_.a(localzc.b);
        a(localObject6, localzc);
        ((w)localObject2).f();
      } while (!bool1);
      if (bool2) {
        break;
      }
    } while (bool2);
    if (this.L.size() <= 1) {
      this.N = false;
    }
    localh.e();
  }
  
  void a(ac paramac, rb paramrb)
  {
    boolean bool = d.Q;
    int j = 0;
    do
    {
      if (j >= paramac.a()) {
        break;
      }
      vb localvb = paramac.a(j);
      bb localbb = localvb.c();
      a(localvb, localbb.f(), paramrb, this);
      j++;
    } while (!bool);
  }
  
  void a(ac paramac, x paramx)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    Iterator localIterator = this.L.iterator();
    Object localObject;
    do
    {
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        localObject = (zc)localIterator.next();
        ((zc)localObject).d = null;
        ((zc)localObject).f = null;
        ((zc)localObject).B = null;
        ((zc)localObject).C = null;
      } while (!bool1);
    } while (bool2);
    int j = 0;
    label291:
    label344:
    label346:
    do
    {
      if (j >= paramac.a()) {
        break;
      }
      localObject = paramac.a(j);
      bb localbb = ((vb)localObject).c();
      if (bool1) {
        return;
      }
      v localv = localbb.f();
      do
      {
        if (localv == null) {
          break;
        }
        e locale = (e)localv.c();
        if (bool2) {
          break label346;
        }
        if (bool1) {
          break label344;
        }
        if ((bool2) || (paramx != null))
        {
          if (bool2) {
            continue;
          }
          if (paramx.getBool(locale)) {}
        }
        else
        {
          zc localzc = b(locale);
          if (!bool2) {
            if (localzc == null)
            {
              ec localec = this.i.a(locale);
              localzc = this.D.i(localec.a());
            }
          }
          if (!bool2) {
            if (localzc.d == null) {
              localzc.d = ((vb)localObject);
            }
          }
          if (!bool2) {
            if (localzc.B == null)
            {
              if (bool2) {
                break label291;
              }
              if (((vb)localObject).d() != 2)
              {
                if (bool2) {
                  break label291;
                }
                if (((vb)localObject).d() != 3) {
                  localzc.B = ((vb)localObject);
                }
              }
            }
          }
          if ((bool2) || ((((vb)localObject).d() != 2) && (((vb)localObject).d() != 3))) {
            localzc.C = ((vb)localObject);
          }
          localzc.f = ((vb)localObject);
        }
        localv = localv.a();
      } while (!bool1);
      if (!bool2) {
        j++;
      }
    } while (!bool1);
    if (!bool2) {
      d();
    }
  }
  
  void b(bc parambc)
  {
    boolean bool3 = d.R;
    boolean bool2 = d.Q;
    x localx = db.a(new boolean[this.e.j()]);
    w localw = this.e.v();
    Object localObject2;
    Object localObject3;
    label268:
    label346:
    do
    {
      if (!localw.e()) {
        break;
      }
      localObject1 = localw.d();
      localObject2 = (d.q_)parambc.a((e)localObject1);
      if ((!bool3) && (bool2)) {
        break label483;
      }
      if (((d.q_)localObject2).d() == 1)
      {
        localObject3 = ((d.q_)localObject2).g();
        if (bool3) {
          continue;
        }
        if ((!localx.getBool(localObject1)) && (((e)localObject1).i().e() == ((a.c.d)localObject3).e()))
        {
          localx.a(localObject1, true);
          do
          {
            z localz1;
            z localz2;
            do
            {
              if (((d.q_)localObject2).d() != 1) {
                break label460;
              }
              e locale1 = ((a.c.d)localObject3).e();
              e locale2 = ((a.c.d)localObject3).f();
              localz1 = a(locale1);
              localz2 = a(locale2);
              if (bool2) {
                break label477;
              }
              Object localObject4 = this;
              do
              {
                if (localz1.isEmpty()) {
                  break;
                }
                if (bool2) {
                  break label268;
                }
                if (localz2.isEmpty()) {
                  break;
                }
                if (!bool3)
                {
                  if (localz1.d() != localz2.d()) {
                    break;
                  }
                  localObject4 = (zc)localz1.e();
                }
                localz2.e();
              } while (!bool2);
              ((d.q_)localObject2).a(((zc)localObject4).b);
            } while (bool3);
            int j = ((d.q_)localObject2).h();
            v localv = localz1.f();
            zc localzc;
            do
            {
              do
              {
                if (localv == null) {
                  break label346;
                }
                localzc = (zc)localv.c();
                if (bool2) {
                  break;
                }
                if (localzc.f.e() >= j)
                {
                  ((d.q_)localObject2).a(localzc.b);
                  if (!bool3) {
                    if (!bool2) {
                      break label346;
                    }
                  }
                }
                else
                {
                  localv = localv.a();
                }
              } while (!bool2);
            } while (bool3);
            localv = localz2.f();
            do
            {
              if (localv == null) {
                break label427;
              }
              localzc = (zc)localv.c();
              if (bool2) {
                break;
              }
              if (localzc.d.e() <= j)
              {
                ((d.q_)localObject2).a(localzc.b);
                if (bool3) {
                  break label457;
                }
                if (!bool2) {
                  break label427;
                }
              }
              localv = localv.a();
            } while (!bool2);
            localObject1 = ((e)localObject1).h().f();
            localObject2 = (d.q_)parambc.a((e)localObject1);
            if (bool3) {
              break label468;
            }
          } while (!bool2);
        }
      }
      localw.f();
    } while ((!bool3) && (!bool2));
    label427:
    label457:
    label460:
    label468:
    label477:
    label483:
    boolean bool1 = this.D.a();
    Object localObject1 = this.e.v();
    do
    {
      if (!((w)localObject1).e()) {
        break;
      }
      localObject2 = ((w)localObject1).d();
      localObject3 = parambc.a((e)localObject2);
      if (!bool3)
      {
        if (((ec)localObject3).d() == 1)
        {
          b(localObject2).a(localObject2);
          if (bool3) {
            continue;
          }
          if (bool1) {
            a(((ec)localObject3).a(), (d.q_)localObject3);
          }
        }
        ((w)localObject1).f();
      }
    } while (!bool2);
  }
  
  void a(e parame, d.q_ paramq_)
  {
    boolean bool = d.R;
    vc localvc1 = paramq_.n();
    vc localvc2 = this.D.a(parame);
    vc localvc3 = this.D.b(parame);
    if ((bool) || (localvc1 != null))
    {
      int j = localvc1.j();
      if (!bool) {
        if (localvc2 != null)
        {
          if (bool) {
            break label82;
          }
          if (localvc2.j() > j) {
            paramq_.a(localvc2);
          }
        }
      }
      label82:
      if (((bool) || (localvc3 != null)) && (localvc3.j() < j)) {
        paramq_.a(localvc3);
      }
    }
  }
  
  z a(e parame)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    z localz = new z();
    do
    {
      for (zc localzc = b(parame); !bool1; localzc = b(localzc))
      {
        if (localzc == null) {
          break;
        }
        if (bool1) {
          break label56;
        }
        localz.add(localzc);
      }
    } while (bool2);
    label56:
    return localz;
  }
  
  void a(e parame, zc paramzc)
  {
    ((d.q_)this.i.a(parame)).a(paramzc.b);
  }
  
  zc b(Object paramObject)
  {
    boolean bool = d.R;
    if (!bool) {
      if ((paramObject instanceof zc))
      {
        paramObject = ((zc)paramObject).b;
        if (bool) {
          break label37;
        }
        if (paramObject == null) {
          return null;
        }
      }
    }
    label37:
    if ((paramObject instanceof e))
    {
      e locale = this.i.a((e)paramObject).a();
      zc localzc = this.D.i(locale);
      if ((bool) || (localzc != null)) {
        return (zc)localzc;
      }
    }
    throw new IllegalStateException("Item has no parent");
  }
  
  void a(Object paramObject, zc paramzc)
  {
    paramzc.a(paramObject);
  }
  
  public boolean c()
  {
    return this.N;
  }
  
  boolean a(a.c.d paramd, bc parambc)
  {
    boolean bool = d.R;
    e locale1 = paramd.e();
    e locale2 = paramd.f();
    ec localec1 = parambc.a(locale1);
    ec localec2 = parambc.a(locale2);
    zc localzc1 = null;
    e locale3;
    ec localec3;
    zc localzc2;
    e locale4;
    if ((bool) || (localec2.d() == 9))
    {
      locale3 = localec2.f();
      localec3 = parambc.a(locale3);
      if (localec3.d() == 15)
      {
        localzc2 = b(locale3);
        locale4 = locale1;
        if (!bool) {
          if (localec1.d() == 8) {
            locale4 = localec1.f();
          }
        }
        if ((bool) || (this.D.b(locale4, localzc2.b))) {
          localzc1 = b(localzc2);
        }
      }
    }
    if (!bool) {
      if ((localzc1 == null) && ((bool) || (localec1.d() == 8)))
      {
        locale3 = localec1.f();
        localec3 = parambc.a(locale3);
        if (localec3.d() == 15)
        {
          localzc2 = b(locale3);
          locale4 = locale2;
          if (!bool)
          {
            if (localec2.d() == 9) {
              locale4 = localec2.f();
            }
            if (bool) {
              break label281;
            }
          }
          if (this.D.b(locale4, localzc2.b)) {
            localzc1 = b(localzc2);
          }
        }
      }
    }
    if (localzc1 != null)
    {
      label281:
      if (!bool)
      {
        if (localec2.d() == 9)
        {
          a(locale2, localzc1);
          localzc1.a(locale2);
          a(localzc1.b, (d.q_)localec2);
        }
        if (bool) {}
      }
      else if (localec1.d() == 8)
      {
        a(locale1, localzc1);
        localzc1.a(locale1);
        a(localzc1.b, (d.q_)localec1);
      }
      return true;
    }
    return false;
  }
  
  public void a(ac paramac, bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    m localm = this.e.w();
    label277:
    label425:
    label448:
    label603:
    label611:
    do
    {
      if (!localm.e()) {
        break;
      }
      a.c.d locald = localm.a();
      if (!a(locald, parambc))
      {
        e locale1 = locald.e();
        e locale2 = locald.f();
        ec localec1 = parambc.a(locale1);
        ec localec2 = parambc.a(locale2);
        Object localObject1;
        Object localObject2;
        while (localec2.d() == 9)
        {
          break label425;
          localObject1 = localec2.f();
          ec localec3 = parambc.a((e)localObject1);
          localObject2 = b(b(localObject1));
          if (((bool2) || (localec3.d() == 15)) && ((bool2) || (localec1.d() == 8)))
          {
            if (!bool2)
            {
              if (localec1.h() < ((zc)localObject2).d.e()) {
                break label277;
              }
              if (bool2) {}
            }
            else
            {
              if (localec1.h() > ((zc)localObject2).f.e()) {
                break label277;
              }
              a(locale2, (zc)localObject2);
              a(locale1, (zc)localObject2);
              ((zc)localObject2).a(locale2);
              a(((zc)localObject2).b, (d.q_)localec1);
              ((zc)localObject2).a(locale1);
              a(((zc)localObject2).b, (d.q_)localec2);
            }
            if (bool2) {
              break label611;
            }
            if (!bool1) {
              break label603;
            }
          }
          zc localzc = null;
          if ((bool2) || (localec1.d() == 8))
          {
            e locale3 = localec1.f();
            localObject3 = parambc.a(locale3);
            if (((ec)localObject3).d() == 15) {
              localzc = b(b(locale3));
            } else {
              localzc = b(localec1.f());
            }
            a(locale1, localzc);
            localzc.a(locale1);
            a(localzc.b, (d.q_)localec1);
          }
          else
          {
            localzc = b(locale1);
          }
          int k = localec2.h();
          Object localObject3 = localzc;
          do
          {
            if (localObject3 == this) {
              break label448;
            }
            if (bool1) {
              break;
            }
            if (((zc)localObject3).f.e() >= k) {
              break label448;
            }
            localObject3 = b(localObject3);
          } while (!bool1);
          a(locale2, (zc)localObject3);
          ((zc)localObject3).a(locale2);
          a(((zc)localObject3).b, (d.q_)localec2);
          if (!bool2)
          {
            if (bool2) {
              break label611;
            }
            if (!bool1) {
              break label603;
            }
          }
        }
        if (bool2) {
          continue;
        }
        if (localec1.d() == 8)
        {
          do
          {
            localObject1 = b(locale2);
            int j = localec1.h();
            localObject2 = localObject1;
            do
            {
              if (localObject2 == this) {
                break label569;
              }
              if (bool1) {
                break;
              }
              if (((zc)localObject2).d.e() <= j) {
                break label569;
              }
              localObject2 = b(localObject2);
            } while (!bool1);
            a(locale1, (zc)localObject2);
            ((zc)localObject2).a(locale1);
          } while (bool2);
          a(((zc)localObject2).b, (d.q_)localec1);
        }
      }
      localm.f();
    } while (!bool1);
    label569:
  }
  
  public void b(ac paramac, bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    w localw = this.e.v();
    label297:
    label353:
    label368:
    do
    {
      if (!localw.e()) {
        break;
      }
      e locale1 = localw.d();
      ec localec1 = parambc.a(locale1);
      if (!bool2)
      {
        if (localec1.d() == 10)
        {
          e locale2 = locale1.i().e();
          ec localec2 = parambc.a(locale2);
          e locale3 = locale1.h().f();
          ec localec3 = parambc.a(locale3);
          zc localzc = b(locale2);
          if (!bool2) {
            if (localec2.d() == 15)
            {
              if (bool2) {
                break label297;
              }
              if (localec3.d() == 15)
              {
                if (!bool2) {
                  if (this.D.b(localec2.a(), localec3.a()))
                  {
                    localzc = b(localec3.a());
                    if (bool2) {
                      break label368;
                    }
                    if (!bool1) {
                      break label353;
                    }
                  }
                }
                if (!bool2)
                {
                  if (this.D.b(localec3.a(), localec2.a()))
                  {
                    localzc = b(localec2.a());
                    if (bool2) {
                      break label368;
                    }
                  }
                }
                else {
                  if (!bool1) {
                    break label353;
                  }
                }
                if (localec3.a() != localec2.a()) {
                  break label353;
                }
                localzc = b(localec2.a());
                if (bool2) {
                  break label368;
                }
                if (!bool1) {
                  break label353;
                }
              }
            }
          }
          if (!bool2) {
            if (localec2.d() == 15)
            {
              localzc = b(localec2.a());
              if (bool2) {
                break label368;
              }
            }
          }
          if ((bool1) && (localec3.d() == 15)) {
            localzc = b(localec3.a());
          }
          a(locale1, localzc);
          localzc.a(locale1);
          a(localzc.b, (d.q_)localec1);
        }
        localw.f();
      }
    } while (!bool1);
  }
  
  public void d(ac paramac, bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int j = 0;
    label49:
    label87:
    do
    {
      do
      {
        break label49;
        if (j >= paramac.a()) {
          break;
        }
        a locala = b(j);
        v localv = locala.f();
        do
        {
          if (localv == null) {
            break label87;
          }
          if (bool1) {
            break;
          }
          if ((localv.c() instanceof zc))
          {
            zc localzc = (zc)localv.c();
            localzc.a(paramac, j, parambc);
          }
          localv = localv.a();
        } while (!bool1);
        j++;
      } while (bool2);
    } while (!bool1);
  }
  
  private zc a(int paramInt, e parame, boolean paramBoolean)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (!bool2) {}
    int j = !paramBoolean ? 1 : 0;
    if (!bool2) {}
    int k = paramBoolean ? 1 : 0;
    HashMap localHashMap1 = new HashMap();
    HashSet localHashSet = new HashSet();
    bb localbb1 = a(parame, true);
    HashMap localHashMap2 = new HashMap();
    z localz = new z();
    Object localObject1 = localbb1.l();
    label204:
    label205:
    Object localObject5;
    label354:
    do
    {
      do
      {
        if (!((w)localObject1).e()) {
          break;
        }
        localObject2 = ((w)localObject1).d();
        zc localzc1 = b(localObject2);
        if (bool1) {
          break label407;
        }
        if (localzc1 != null)
        {
          if (!bool2) {
            if (localHashMap2.containsKey(localzc1))
            {
              int n = ((Integer)localHashMap2.get(localzc1)).intValue();
              if (bool2) {
                break label204;
              }
              localHashMap2.put(localzc1, new Integer(n + 1));
              if (!bool1) {
                break label205;
              }
            }
          }
          localHashMap2.put(localzc1, new Integer(1));
        }
        localObject3 = a((e)localObject2);
        int i1 = ((z)localObject3).size();
        localObject5 = ((z)localObject3).f();
        do
        {
          if (localObject5 == null) {
            break label354;
          }
          zc localzc2 = (zc)((v)localObject5).c();
          if (bool1) {
            break;
          }
          if (!bool2)
          {
            if (localzc2.f.e() + k >= paramInt) {
              if (bool2) {
                continue;
              }
            }
          }
          else if (localzc2.d.e() - j <= paramInt)
          {
            if (bool2) {
              continue;
            }
            if (!localHashSet.contains(localzc2))
            {
              localz.add(localzc2);
              localHashSet.add(localzc2);
              localHashMap1.put(localzc2, new Integer(i1));
            }
          }
          i1--;
          localObject5 = ((v)localObject5).a();
        } while (!bool1);
        ((w)localObject1).f();
      } while (bool2);
    } while (!bool1);
    if (!bool2)
    {
      if (paramBoolean) {
        localObject1 = localz.h();
      }
    }
    else if (!((y)localObject1).e()) {}
    label407:
    label466:
    while (bool2)
    {
      localObject2 = (zc)((y)localObject1).j();
      if (!bool2)
      {
        if (localHashMap2.containsKey(localObject2))
        {
          int m = ((Integer)localHashMap2.get(localObject2)).intValue();
          if (bool2) {
            break label466;
          }
          if (m == localbb1.size()) {
            return localObject2;
          }
        }
        ((y)localObject1).f();
      }
      if (!bool1) {
        break;
      }
    }
    localObject1 = a(parame, false);
    Object localObject2 = new z();
    bb localbb2 = new bb();
    localHashSet.clear();
    localHashMap2.clear();
    Object localObject3 = ((bb)localObject1).l();
    label628:
    label629:
    do
    {
      do
      {
        if (!((w)localObject3).e()) {
          break;
        }
        localObject4 = ((w)localObject3).d();
        localObject5 = b(localObject4);
        if (bool1) {
          break label872;
        }
        if (localObject5 != null)
        {
          if (!bool2) {
            if (localHashMap2.containsKey(localObject5))
            {
              int i3 = ((Integer)localHashMap2.get(localObject5)).intValue();
              if (bool2) {
                break label628;
              }
              localHashMap2.put(localObject5, new Integer(i3 + 1));
              if (!bool1) {
                break label629;
              }
            }
          }
          localHashMap2.put(localObject5, new Integer(1));
        }
        localObject6 = a((e)localObject4);
        int i4 = ((z)localObject6).size();
        v localv = ((z)localObject6).f();
        do
        {
          if (localv == null) {
            break label819;
          }
          zc localzc4 = (zc)localv.c();
          if (bool1) {
            break;
          }
          if (!bool2)
          {
            if (localzc4.f.e() + k >= paramInt) {
              if (bool2) {
                continue;
              }
            }
          }
          else if (localzc4.d.e() - j <= paramInt)
          {
            if (!bool2)
            {
              if (!localHashSet.contains(localzc4))
              {
                ((z)localObject2).add(localzc4);
                localHashSet.add(localzc4);
              }
            }
            else
            {
              if (!bool2) {
                if (localHashMap1.containsKey(localzc4))
                {
                  localbb2.add(localzc4);
                  if ((!bool2) && (!bool1)) {
                    break label804;
                  }
                }
              }
              localz.add(localzc4);
              localHashMap1.put(localzc4, new Integer(i4));
            }
            i4--;
          }
          localv = localv.a();
        } while (!bool1);
        ((w)localObject3).f();
      } while (bool2);
    } while (!bool1);
    label804:
    label819:
    if (!bool2)
    {
      if (!paramBoolean)
      {
        localObject3 = ((z)localObject2).h();
        if (!((y)localObject3).e()) {}
      }
      label872:
      while (bool2)
      {
        localObject4 = (zc)((y)localObject3).j();
        if (bool1) {
          break label944;
        }
        if (localHashMap2.containsKey(localObject4))
        {
          i2 = ((Integer)localHashMap2.get(localObject4)).intValue();
          if (bool2) {
            break label931;
          }
          if (i2 == ((bb)localObject1).size()) {
            return localObject4;
          }
        }
        ((y)localObject3).f();
        if (!bool1) {
          break;
        }
      }
    }
    label931:
    label944:
    localObject3 = localbb2.isEmpty() ? localz : localbb2;
    if (!bool2) {
      if (((z)localObject3).isEmpty()) {
        return null;
      }
    }
    Object localObject4 = (zc)((z)localObject3).a();
    int i2 = ((Integer)localHashMap1.get(localObject4)).intValue();
    Object localObject6 = ((z)localObject3).h();
    do
    {
      if (!((y)localObject6).e()) {
        break;
      }
      if (bool1) {
        break label1079;
      }
      zc localzc3 = (zc)((y)localObject6).j();
      int i5 = ((Integer)localHashMap1.get(localzc3)).intValue();
      if (!bool2)
      {
        if (i2 < i5)
        {
          localObject4 = localzc3;
          i2 = i5;
        }
        ((y)localObject6).f();
      }
    } while (!bool1);
    label1079:
    return localObject4;
  }
  
  private bb a(e parame, boolean paramBoolean)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    bb localbb1 = new bb();
    bb localbb2 = new bb();
    if (!bool2)
    {
      if (paramBoolean) {
        localbb2.a(parame.p());
      }
    }
    else
    {
      if (bool2) {
        break label69;
      }
      if (!bool1) {
        break label64;
      }
    }
    localbb2.a(parame.q());
    label64:
    label69:
    do
    {
      do
      {
        e locale;
        do
        {
          do
          {
            if (localbb2.isEmpty()) {
              return localbb1;
            }
            if (bool1) {
              break label198;
            }
            locale = localbb2.o();
            ec localec = this.i.a(locale);
            if (!bool2) {
              if (localec.d() != 6)
              {
                if (bool2) {
                  break label189;
                }
                if (localec.d() != 7) {
                  break label175;
                }
              }
            }
            if (bool2) {
              break label172;
            }
            if (!paramBoolean) {
              break;
            }
            localbb2.a(locale.q());
            if (bool2) {
              break label172;
            }
          } while (!bool1);
          localbb2.a(locale.q());
        } while (!bool1);
        if (bool2) {
          break label198;
        }
        localbb1.add(locale);
      } while (bool2);
    } while (!bool1);
    label172:
    label175:
    label189:
    label198:
    return localbb1;
  }
  
  void a(ac paramac)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int j = 0;
    label219:
    do
    {
      if (j >= paramac.a()) {
        break;
      }
      vb localvb = paramac.a(j);
      v localv = localvb.c().f();
      do
      {
        if (localv == null) {
          break label219;
        }
        e locale = (e)localv.c();
        ec localec = this.i.a(locale);
        if (bool1) {
          break;
        }
        zc localzc;
        if (localec.d() == 6)
        {
          localzc = a(j, locale, true);
          ((d.q_)localec).a(localzc.b);
          a(locale, localzc);
          a(localzc.b, (d.q_)localec);
          if (bool2) {
            continue;
          }
          if (!bool1) {}
        }
        else
        {
          if (bool2) {
            continue;
          }
          if (localec.d() == 7)
          {
            localzc = a(j, locale, false);
            ((d.q_)localec).a(localzc.b);
            a(locale, localzc);
            a(localzc.b, (d.q_)localec);
          }
        }
        localv = localv.a();
      } while (!bool1);
      j++;
    } while ((!bool2) && (!bool1));
  }
  
  public void e(ac paramac, bc parambc)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int j = 0;
    Object localObject;
    do
    {
      do
      {
        if (j >= this.L.size()) {
          break;
        }
        localObject = (zc)this.L.get(j);
        ((zc)localObject).f();
        j++;
        if (bool2) {
          break label67;
        }
        if (bool1) {
          break label66;
        }
      } while (!bool1);
    } while (bool2);
    j = 0;
    label66:
    label67:
    label195:
    do
    {
      if (j >= paramac.a()) {
        break;
      }
      localObject = paramac.a(j);
      v localv = ((vb)localObject).c().f();
      do
      {
        if (localv == null) {
          break label195;
        }
        e locale = (e)localv.c();
        zc localzc1 = b(locale);
        a locala = localzc1.b(j);
        locala.add(locale);
        ec localec = parambc.a(locale);
        if (bool1) {
          break;
        }
        if (localec.d() == 12)
        {
          zc localzc2 = b(localzc1);
          localzc2.b(j).add(localzc1);
        }
        localv = localv.a();
      } while (!bool1);
      j++;
    } while ((!bool2) && (!bool1));
  }
  
  public e a(e parame1, e parame2)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (!bool2) {
      if (parame1 == parame2) {
        return parame1;
      }
    }
    if ((bool2) || (parame1 != null))
    {
      if (bool2) {
        break label43;
      }
      if (parame2 != null) {}
    }
    else
    {
      return null;
    }
    label43:
    int[] arrayOfInt = new int[parame1.g().j()];
    z localz1 = a(parame1);
    z localz2 = a(parame2);
    arrayOfInt[parame1.f()] += 1;
    y localy = localz1.h();
    if (localy.e()) {}
    Object localObject;
    e locale;
    while (bool2)
    {
      localObject = localy.j();
      locale = null;
      if (bool1) {
        break label187;
      }
      if ((localObject instanceof e)) {
        locale = (e)localObject;
      }
      if ((bool2) || ((localObject instanceof zc))) {
        locale = ((zc)localObject).b;
      }
      if (locale != null) {
        arrayOfInt[locale.f()] += 1;
      }
      localy.f();
      if (!bool1) {
        break;
      }
    }
    if (arrayOfInt[parame2.f()] > 0) {
      label187:
      return parame1;
    }
    localy = localz2.h();
    do
    {
      if (!localy.e()) {
        break;
      }
      localObject = localy.j();
      if (bool1) {
        break label305;
      }
      locale = null;
      if ((bool2) || ((localObject instanceof e))) {
        locale = (e)localObject;
      }
      if ((bool2) || ((localObject instanceof zc))) {
        locale = ((zc)localObject).b;
      }
      if (locale != null)
      {
        if (bool2) {
          continue;
        }
        if (arrayOfInt[locale.f()] > 0) {
          return locale;
        }
      }
      localy.f();
    } while (!bool1);
    label305:
    return null;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.d.a.ad

 * JD-Core Version:    0.7.0.1

 */